<?php
namespace app\admin\model;
use think\Model;
use think\Db;
class Bill extends Model{
	
	protected $table = 'house_bill';
	protected $pk = 'b_id';
	
	
	public function message()
    {
        return $this->belongsTo('message');
    }
    public function add(){
		
		$data=input('post.');
			
			//halt($data);
		$bill = new Bill();
		
		$result = $bill->save($data);
		return $result;
	}
	public function number()
    {
        return $this->hasOne('number','n_id','n_id');
    }
    public function rom()
    {
        return $this->hasOne('rom','r_id','r_id');
    }
	

}
?>